//
//  xsTextView.h
//  digital_robot_demo
//
//  Created by xskj on 2024/8/29.
// 文字
// @[@"键盘",@"样式"]

#import <UIKit/UIKit.h>
#import "NSString+WordSize.h"
#import "xsTextCollectionView.h"

#import "xsFontStyleData.h"
#import "xsFontFamilyData.h"

NS_ASSUME_NONNULL_BEGIN

typedef enum : NSUInteger {
    TopTextPlaceholdType_text = 0,// 普通文本
    TopTextPlaceholdType_Subtitles=1,// 字幕
    TopTextPlaceholdType_tile// 标题
} bossTopTextPlaceholdType;

typedef enum : NSUInteger {
    bossTopTextClickButtonStyle_keybord = 0,// 键盘
    bossTopTextClickButtonStyle_style=1,// 样式
} bossTopTextClickButtonStyle;

@protocol xsTextViewProtoCol <NSObject>

@optional
- (void)xsTextViewxsVerifyButtonBeClick:(UIButton *)button;

// 0:键盘   1:样式
- (void)xsKeybordStyleButtonBeClickEventCallBack:(NSInteger)tag;

- (void)xsTexTextfieldTextChange:(NSString *)textChangeString;

- (void)xsTexTextfieldTextReturnKeyBeClickChange:(NSString *)textChangeString;


//字体类别事件
- (void)xsTexViewFontFamilyEvent:(xsFontFamilyData *)xsFontFamilyDict;
//文字的描边图片事件
- (void)xsTexViewFontBackgroundEvent:(xsFontStyleData *)xsFontBackgroundDict;
//文字颜色事件
- (void)xsTexViewTextColorEvent:(NSString *)xsColorString;
//文字描边事件
- (void)xsTexViewTextContourEvent:(NSString *)xsColorString;
//文字大小事件
- (void)xsTexViewTextSizeEvent:(CGFloat )xsTextSizet;

//文字描边边框大小事件
- (void)xsTexViewTextContourOutlineSizeEvent:(CGFloat)OutlineW;


@end

@interface xsTextView : UIView


@property (nonatomic,assign)bossTopTextClickButtonStyle ClickButtonStyle;

@property (nonatomic,assign)id<xsTextViewProtoCol> delegate;
- (instancetype)initWithButtonTitles:(NSArray *)buttonTitles;

- (void)xsSetFrame;
// 设置输入文本字符
- (void)xsTopInputTextFeildTextString:(NSString *)textStr;

// 修改输入框提示词
- (void)bossChangeTopInputTextFeildPlaceholderWithbossTopTextPlaceholdType:(bossTopTextPlaceholdType )topPlaceholderTyp;

// 隐藏键盘
- (void)xstopInputTextFeildresignFirstRespond;

//修改键盘 样式底部线的位置 tg 0键盘 1样式
- (void)xsChangeKeyBordStyleLineViewLocationWithTag:(int)tg;

- (void)xsTopInputTextFeildTextbecomeFirstResponder;

@end

NS_ASSUME_NONNULL_END
